package com.higgins.lawapp.client.settings.dataItemModel;

import java.io.Serializable;

@SuppressWarnings("serial")
public class DataItemDTO implements Serializable 	{
	private String itemOne;
	private String itemTwo;
	private String itemThree;
	private String itemFour;
	private String itemFive;
	private String itemOneOriginal;
	private String itemTwoOriginal;
	private String itemThreeOriginal;
	private String itemFourOriginal;
	private String itemFiveOriginal;
	private Boolean urlOne;
	private Boolean urlTwo;
	private Boolean urlThree;
	private Boolean urlFour;
	private Boolean urlFive;
	private Boolean concatOne;
	private Boolean concatTwo;
	private Boolean concatThree;
	private Boolean concatFour;
	private Boolean concatFive;
	private String type;
	
	
	public DataItemDTO()	{
		
	}
	public void setType(String type)	{
		this.type = type;
	}
	public String getType()	{
		return type;
	}
	
	
	public void setItemOne(String itemOne)	{
		this.itemOne = itemOne;
	}
	public void setItemTwo(String itemTwo)	{
		this.itemTwo = itemTwo;
	}
	public void setItemThree(String itemThree)	{
		this.itemThree = itemThree;
	}
	public void setItemFour(String itemFour)	{
		this.itemFour = itemFour;
	}
	public void setItemFive(String itemFive)	{
		this.itemFive = itemFive;
	}
	
	
	
	public void setItemOneOriginal(String itemOne)	{
		this.itemOneOriginal = itemOne;
	}
	public void setItemTwoOriginal(String itemTwo)	{
		this.itemTwoOriginal = itemTwo;
	}
	public void setItemThreeOriginal(String itemThree)	{
		this.itemThreeOriginal = itemThree;
	}
	public void setItemFourOriginal(String itemFour)	{
		this.itemFourOriginal = itemFour;
	}
	public void setItemFiveOriginal(String itemFive)	{
		this.itemFiveOriginal = itemFive;
	}
	
	
	
	public String getItemOneOriginal()	{
		return itemOneOriginal;
	}
	public String getItemTwoOriginal()	{
		return itemTwoOriginal;
	}
	public String getItemThreeOriginal()	{
		return itemThreeOriginal;
	}
	public String getItemFourOriginal()	{
		return itemFourOriginal;
	}
	public String getItemFiveOriginal()	{
		return itemFiveOriginal;
	}
	
	
	
	
	public void setURLOne(Boolean urlOne)	{
		this.urlOne = urlOne;
	}
	public Boolean getURLOne()	{
		return urlOne;
	}
	public void setURLTwo(Boolean urlTwo)	{
		this.urlTwo = urlTwo;
	}
	public Boolean getURLTwo()	{
		return urlTwo;
	}
	public void setURLThree(Boolean urlThree)	{
		this.urlThree = urlThree;
	}
	public Boolean getURLThree()	{
		return urlThree;
	}
	public void setURLFour(Boolean urlFour)	{
		this.urlFour = urlFour;
	}
	public Boolean getURLFour()	{
		return urlFour;
	}
	public void setURLFive(Boolean urlFive)	{
		this.urlFive = urlFive;
	}
	public Boolean getURLFive()	{
		return urlFive;
	}
	
	
	
	public Boolean getConcatOne()		{
		return concatOne;
	}
	public Boolean getConcatTwo()		{
		return concatTwo;
	}
	public Boolean getConcatThree()	{
		return concatThree;
	}
	public Boolean getConcatFour()		{
		return concatFour;
	}
	public Boolean getConcatFive()		{
		return concatFive;
	}

	
	public void setConcatOne(Boolean concatOne)	{
		this.concatOne = concatOne;
	}
	public void setConcatTwo(Boolean concatTwo)	{
		this.concatTwo = concatTwo;
	}
	public void setConcatThree(Boolean concatThree)	{
		this.concatThree = concatThree;
	}
	public void setConcatFour(Boolean concatFour)	{
		this.concatFour = concatFour;
	}
	public void setConcatFive(Boolean concatFive)	{
		this.concatFive = concatFive;
	}
	
	
	
	public void setItemOne(String itemOne, Boolean urlOne, Boolean concatOne)	{
		if (itemOne==null)
			itemOne="";
		if (urlOne==null)
			urlOne = false;
		if (concatOne==null)
			concatOne=true;
		this.itemOne = urlOne?convertToInternetForm(itemOne):itemOne; 
		this.urlOne = urlOne;
		this.concatOne = concatOne;
	}
	public String getItemOne()	{
		return itemOne;
	}
	public void setItemTwo(String itemTwo, Boolean urlTwo, Boolean concatTwo)	{
		if (itemTwo==null)
			itemTwo="";
		if (urlTwo==null)
			urlTwo = false;
		if (concatTwo==null)
			concatTwo=true;
		this.itemTwo = urlTwo?convertToInternetForm(itemTwo):itemTwo; 
		this.urlTwo = urlTwo;
		this.concatTwo = concatTwo;
	}
	public String getItemTwo()	{
		return itemTwo;
	}
	public void setItemThree(String itemThree, Boolean urlThree, Boolean concatThree)	{
		if (itemThree==null)
			itemThree="";
		if (urlThree==null)
			urlThree = false;
		if (concatThree==null)
			concatThree=true;
		this.itemThree = urlThree?convertToInternetForm(itemThree):itemThree; 
		this.urlThree = urlThree;
		this.concatThree = concatThree;
	}
	public String getItemThree()	{
		return itemThree;
	}
	public void setItemFour(String itemFour, Boolean urlFour, Boolean concatFour)	{
		if (itemFour==null)
			itemFour="";
		if (urlFour==null)
			urlFour = false;
		if (concatFour==null)
			concatFour=true;
		this.itemFour = urlFour?convertToInternetForm(itemFour):itemFour; 
		this.urlFour = urlFour;
		this.concatFour = concatFour;
	}
	public String getItemFour()	{
		return itemFour;
	}
	public void setItemFive(String itemFive, Boolean urlFive, Boolean concatFive)	{
		if (itemFive==null)
			itemFive="";
		if (urlFive==null)
			urlFive = false;
		if (concatFive==null)
			concatFive=true;
		this.itemFive = urlFive?convertToInternetForm(itemFive):itemFive; 
		this.urlFive = urlFive;
		this.concatFive = concatFive;
	}
	public String getItemFive()	{
		return itemFive;
	}
	
	public Boolean urlOne()	{
		return urlOne;
	}
	public Boolean urlTwo()	{
		return urlTwo;
	}
	public Boolean urlThree()	{
		return urlThree;
	}
	public Boolean urlFour()	{
		return urlFour;
	}
	public Boolean urlFive()	{
		return urlFive;
	}
	
	
	public Boolean isURL(int index)	{
		boolean returnBoolean = false;
		switch (index)	{
		case 0:
			returnBoolean =  urlOne;
			break;
		case 1:
			returnBoolean =  urlTwo;
			break;
		case 2:
			returnBoolean =  urlThree;
			break;
		case 3:
			returnBoolean =  urlFour;
			break;
		case 4:
			returnBoolean =  urlFive;
			break;
		}
		return returnBoolean;
	}

	public Boolean isConcat(int index)	{
		boolean returnBoolean = false;
		switch (index)	{
		case 0:
			returnBoolean =  concatOne;
			break;
		case 1:
			returnBoolean =  concatTwo;
			break;
		case 2:
			returnBoolean =  concatThree;
			break;
		case 3:
			returnBoolean =  concatFour;
			break;
		case 4:
			returnBoolean =  concatFive;
			break;
		}
		return returnBoolean;
	}
	private String convertToInternetForm(String url)	{
//		String removedAndSymbol = url.replace("&", "+%26+");
//		String removedSpaces = removedAndSymbol.replace(" ", "");
		return url;
	}
}
